<template>
	<view class="content" v-if="info.hasOwnProperty('id') && info.id !== undefined">
		<u-navbar :autoBack="true" bgColor="rgba(0,0,0,0)" :fixed="true" @click-left="$back" ></u-navbar>
		
		<image :src="'/images/qbg_02.png' | formatImgUrl" class="bei" mode=""></image>
		<view class="neibox">
			<view class="title" :style="info.status==2?'color:#3d3d3d':''">
				{{info.status_label}}<br>
				<text v-if="status==2">
					请不要灰心哦！
				</text>
				<text>
					福利享不停
				</text>
				！
			</view>
			
			
			<view class="lvbg"  :style="info.status==2?'background:#3d3d3d;':''"> 
				<image :src="'/images/zhang_01.png' | formatImgUrl" class="zhangpic" mode=""></image>
				<view class="xunbox">
					<view class="haobox">
						<view class="haotitle">
							入团信息
						</view>
						<view class="haotitle">
							{{info.team.number}}-{{info.team.name}}
						</view>
					</view>
					<view class="haobox">
						<view class="haotitle">
							QQ群
						</view>
						<view class="haotitle">
							{{info.team.qq}}
						</view>
					</view>
					<view class="haobox">
						<view class="haotitle">
							分成
						</view>
						<view class="haotitle">
							90%
						</view>
					</view>
					<view class="haobox" v-if="info.end_time || info.team.end_time">
						<view class="haotitle">
							到期时间
						</view>
						<view class="haotitle">
							{{info.end_time || info.team.end_time}}
						</view>
					</view>
					
					<view class="haobox" v-if="info.status==2">
						<view class="haotitle">
							拒绝原因
							<view>
								{{info.refuse_msg?info.refuse_msg:"-"}}
							</view>
						</view>
					</view>
					
					
				</view>
			</view>
			<view class="lvbg" v-if="info.status==2" style="background: #3d3d3d;box-shadow:none">
				<view class="xunbox">
					<view class="fail_button" @click="$go('/pages/user/hot')">选择团队</view>
				</view>
			</view>
			<view class="lvbg" v-else>
				<view class="xunbox">
					<view class="fail_button" @click="$back">返回写手大厅</view>
				</view>
			</view>
			<view class="xuztxt">
				签约须知：<br>
				1.约稿佣金按天结算，每周三、周五、周日可提现。<br>
				2.申请退团以及申请转团联系团长。<br>
				3.首次签约团队，3个月内不能强制解约。<br>
				4.在签约期限内，写手不能签约其它团队，或是开小号签约其他团队。<br>
				5.签约团队后，能够提现的佣金计算公式是100（完成订单的粮币）* 0.9－团队抽取的佣金金额<br>
				6.如在团内遇到争议，且无法与团长协商解决，请保留好相关证据，进行申诉！<br>
				7.请阅读并同意<text @click.stop="goToOtherxie(9)">《团队签约协议》</text>。
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				id: 0,
				info: {}
			}
		},
		onLoad(e) {
			if (e.id) {
				this.id = e.id
				this.getInfo()
			} else {
				this.$common.errorToShow('参数异常')
			}
		},

		methods: {
			goUserPage() {
				uni.reLaunch({
					url: '/pages/user/user'
				})
			},
			getInfo() {
				this.$api.default.request('user/getApplyTeamInfo', {
					id: this.id
				}, 'POST', false).then((res) => {
					if (res.code) {
						this.info = res.data
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: rgba(242, 245, 242, 1);
	}

	.content {
		position: relative;
		padding: 204rpx 0 0;
		padding-top: 154px;

		.bei {
			width: 100%;
			height: 100vh;
			position: fixed;
			left: 0;
			top: 0;
			z-index: -1;
		}

		.neibox {
			padding: 0 75rpx;

			.title {
				font-size: 72rpx;
				font-weight: bold;
				letter-spacing: 0px;
				line-height: 104rpx;
				padding-bottom: 36rpx;
				color: #45C4B0;
			}

			.lvbg {
				border-radius: 15px;
				background: #45C4B0;
				box-shadow: 0px 4px 10px 0px #45C4B0, inset 0px 4px 10px 0px rgba(255, 255, 255, 0.3);
				position: relative;

				.zhangpic {
					width: 200rpx;
					height: 195rpx;
					position: absolute;
					bottom: 0;
					right: 0;
					z-index: 1;
				}

				.xunbox {
					padding: 0 40rpx;

					.haobox {
						display: flex;
						align-items: center;
						justify-content: space-between;
						padding: 30rpx 0 30rpx;
						border-bottom: 1px solid rgba(255, 255, 255, 0.1);

						.haotitle {
							font-size: 28rpx;
							font-weight: bold;
							line-height: 40rpx;
							letter-spacing: 0px;
							color: #FFFFFF;
							view{
								// font-size: 26rpx;
								margin-top: 10rpx;
								font-weight: normal;
								
							}
						}
					}

					.fail_button {
						margin-top: 20rpx;
						text-align: center;
						padding: 10rpx 0;
						color: #FFFFFF;
					}
				}
			}

			.xuztxt {
				padding-top: 40rpx;
				line-height: 28rpx;
				font-size: 20rpx;
				font-weight: normal;
				letter-spacing: 0em;
				color: #999999;
			}
		}
	}
</style>